#ifndef CHDF5GroupObject_H
#define CHDF5GroupObject_H
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <string>

#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cout;
using std::endl;
#endif  // H5_NO_STD
#endif

#include "H5Cpp.h"

#ifndef H5_NO_NAMESPACE
using namespace H5;
#endif

class CHDF5GroupObject
{
public:
	CHDF5GroupObject();
	virtual ~CHDF5GroupObject()=0;

public:
	void load(const H5std_string& filename);
	virtual int read(const H5std_string& filename,const H5std_string& location,const H5std_string& groupName)=0;
	virtual int write(const H5std_string& filename,const H5std_string& location,const H5std_string& groupName)=0;
	virtual int append(const H5std_string& filename,const H5std_string& location,const H5std_string& groupName)=0;

	bool isGroupExist(const H5std_string& location);
	int createGroups(const H5std_string& location,const H5std_string& groupName);
	H5std_string GetErrMsg() const;

	//int openGroup(const H5std_string& location,const H5std_string& groupName);
public:
	H5File* h5_file;

protected:
	H5std_string errMsg;
};
#endif